#!/usr/bin/python
# -*- coding: UTF-8 -*-
# 文件名：10-os.py

#import os
# os.mkdir('test')
#print os.getcwd()
# 获得进程号，在多进程时常用到
#print "当前进程号:{0}".format(os.getpid())


# 传的参数都当作字符串处理，默认以空格区分

'''
import sys
print sys.argv[1]
print sys.argv[2]
'''

'''
   参数默认被当做字符串处理
python pysys.py first second three
python pysys.py "first" 'second' three
first < type 'str' >
second <type 'str'>'''


import commands
# 本机上python语言执行shell语言
comm1 = "ls"
#comm1 = "sh testcomman.sh"
status, output = commands.getstatusoutput(comm1)
print status, output